package com.zhang.hadoop.netty.netty.dubborpc.provider;

import com.zhang.hadoop.netty.netty.dubborpc.publicinterface.HelloService;

/**
 * @author zhang yufei
 * @date 2022/3/23 4:30 下午
 **/
public class HelloServiceImpl implements HelloService {

    private static int count=0;

    //当有消费方调用该方法时,就返回一个结果
    @Override
    public String hello(String message) {
        System.out.println("收到客户端消息=" + message);
        if (message != null) {
            return "你好客户端,我已经收到你的消息[" + message + "]第"+(++count+"次");
        } else {
            return "你好客户端,我已经收到你的消息";
        }
    }
}
